var list = document.querySelector('#bannerlist');
var itemCount = 3;
function init() {
  for (var i = 0; i < itemCount; i++) {
    var li = document.createElement('li');
    li.className = 'item';
    li.innerText = '我是第' + i + '项';
    list.appendChild(li);
  }

  var li = document.createElement('li');
  li.className = 'item';
  li.innerText = '我是第0项';
  list.appendChild(li);

  startScoll();
}

var curIndex = 0;
function startScoll() {
    if (curIndex > itemCount) {
        console.log('object');
      curIndex = 0;
      list.style.marginTop = 0;
    }
  setti(() => {
    curIndex++;
    list.style.marginTop = curIndex * -60 + 'px';
  }, 1000);
}

init();
